<%@ include file="/common/taglibs.jsp"%>
<%@ page contentType="text/html; charset=UTF-8"%>

<div class="preview_wrap">
	<div class="content">
		<table cellspacing="0" cellpadding="0" border="0" width="100%" class="preview_table">
			<tr>
				<c:choose>
					<c:when test="${not empty previewFileData}">
						<c:set var="colCount" value="${fn:length(previewFileData[0])}"/>
					</c:when>
					<c:otherwise>
						<c:set var="colCount" value="1"/>
					</c:otherwise>
				</c:choose>
				<td class="title1" colspan="${colCount+1}">
					<fmt:message key="import.import.file.rowCount" />:<b>${rowCount}</b><fmt:message key="import.import.file.tiao" />
					<c:if test="${rowCount > 200}">
						<fmt:message key="import.preview.limit" />
					</c:if>
				</td>
			</tr>
			<c:forEach items="${previewFileData}" var="rowData" varStatus="varStatus">
				<tr>
					<c:choose>
						<c:when test="${varStatus.first}">
							<th>${varStatus.index+1}</th>
						</c:when>
						<c:otherwise>
							<td>${varStatus.index+1}</td>
						</c:otherwise>
					</c:choose>	
					<c:forEach items="${rowData}" var="columnData" >
						<c:choose>
							<c:when test="${varStatus.first}">
								<th>${columnData}</th>
							</c:when>
							<c:otherwise>
								<td>${columnData}</td>
							</c:otherwise>
						</c:choose>
					</c:forEach>
				</tr>
			</c:forEach>
		</table>
	</div>
</div>
